package com.tiamo.traders.controller.controllerFont;

import com.tiamo.traders.entity.Business;
import com.tiamo.traders.entity.Nav;
import com.tiamo.traders.entity.News;
import com.tiamo.traders.entity.Partners;
import com.tiamo.traders.servicefront.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;


@RestController
public class HomeFrontController {
    @Autowired
    private HomeService homeService;
    /*
    * 前端主页
    *
    * */
    @RequestMapping("/home")
    public Map HomeFindAll(){
        return homeService.home();
    }

    @RequestMapping("/navFindAll")
    private List<Nav> navFindAll() {
        return homeService.navFindAll();
    }

    @RequestMapping("/partnersFindAll")
    private List<Partners> partnersFindAll() {
        return homeService.partnersFindAll();
    }

    @RequestMapping("/newsFindAll")
    private List<News> newsFindAll() {
        return homeService.newsFindAll();
    }

    @RequestMapping("/businessFindAll")
    private List<Business> businessFindAll() {
        return homeService.businessFindAll();
    }
}
